//获得 leanCloud AV 的引用
const AV = require('../../libs/av-weapp-min.js');

//获取应用实例
var app = getApp()

Page({
  data: {
    hiddenOrder: false,
    hiddenAddress: true,
    province:''
  },
  onLoad: function (options) {
    var that = this
    // console.log(app.globalData.user)
    var userInfo = app.globalData.user
    var address = wx.getStorageSync('province');
    that.setData({
      userInfo: userInfo,
      province: address
    })
  },
  onShareAppMessage: function () {
    // 用户点击右上角分享
    return {
      title: 'title', // 分享标题
      desc: 'desc', // 分享描述
      path: 'path' // 分享路径
    }
  },
  toOrder: function (res) {
    this.setData({
      hiddenOrder: false,
      hiddenAddress: true
    })
  },
  toAddress: function (res) {
    this.setData({
      hiddenOrder: true,
      hiddenAddress: false
    })
  }
})